<!DOCTYPE html>
<!-- 
Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.0
Version: 1.5
Author: KeenThemes
Website: http://www.keenthemes.com/
Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes
-->
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
   <meta charset="utf-8" />
   <title>利导科技客户关系管理系统  | 编辑客户</title>
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta content="width=device-width, initial-scale=1.0" name="viewport" />
   <meta content="" name="description" />
   <meta content="" name="author" />
   <meta name="MobileOptimized" content="320">
   <!-- BEGIN GLOBAL MANDATORY STYLES -->          
   <link href="${base}/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
   <link href="${base}/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
   <link href="${base}/assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
   <!-- END GLOBAL MANDATORY STYLES -->
   <!-- BEGIN PAGE LEVEL STYLES -->
    <!-- BEGIN PAGE LEVEL STYLES -->
   <link rel="stylesheet" type="text/css" href="${base}/assets/plugins/bootstrap-fileupload/bootstrap-fileupload.css" />
   <link rel="stylesheet" type="text/css" href="${base}/assets/plugins/gritter/css/jquery.gritter.css" />
   <link rel="stylesheet" type="text/css" href="${base}/assets/plugins/select2/select2_metro.css" />
   <link rel="stylesheet" type="text/css" href="${base}/assets/plugins/clockface/css/clockface.css" />
   <link rel="stylesheet" type="text/css" href="${base}/assets/plugins/bootstrap-wysihtml5/bootstrap-wysihtml5.css" />
   <link rel="stylesheet" type="text/css" href="${base}/assets/plugins/bootstrap-datepicker/css/datepicker.css" />
   <link rel="stylesheet" type="text/css" href="${base}/assets/plugins/bootstrap-timepicker/compiled/timepicker.css" />
   <link rel="stylesheet" type="text/css" href="${base}/assets/plugins/bootstrap-colorpicker/css/colorpicker.css" />
   <link rel="stylesheet" type="text/css" href="${base}/assets/plugins/bootstrap-daterangepicker/daterangepicker-bs3.css" />
   <link rel="stylesheet" type="text/css" href="${base}/assets/plugins/bootstrap-datetimepicker/css/datetimepicker.css" />
   <link rel="stylesheet" type="text/css" href="${base}/assets/plugins/jquery-multi-select/css/multi-select.css" />
   <link href="${base}/assets/plugins/bootstrap-switch/static/stylesheets/bootstrap-switch-metro.css" rel="stylesheet" type="text/css"/>
   <link rel="stylesheet" type="text/css" href="${base}/assets/plugins/jquery-tags-input/jquery.tagsinput.css" />
   <!-- END PAGE LEVEL STYLES -->
   <!-- BEGIN THEME STYLES --> 
   <link href="${base}/assets/css/style-metronic.css" rel="stylesheet" type="text/css"/>
   <link href="${base}/assets/css/style.css" rel="stylesheet" type="text/css"/>
   <link href="${base}/assets/css/style-responsive.css" rel="stylesheet" type="text/css"/>
   <link href="${base}/assets/css/plugins.css" rel="stylesheet" type="text/css"/>
   <link href="${base}/assets/css/themes/default.css" rel="stylesheet" type="text/css" id="style_color"/>
   <link href="${base}/assets/css/custom.css" rel="stylesheet" type="text/css"/>
   <!-- END THEME STYLES -->
   <link rel="shortcut icon" href="${base}/assets/img/favicon.ico" />
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
	<#include "header.ftl">
   <div class="clearfix"></div>
   <!-- BEGIN CONTAINER -->
   <div class="page-container">
      <!-- BEGIN SIDEBAR -->
      <#include "main_menu.ftl">
      <!-- END SIDEBAR -->
      <!-- BEGIN PAGE -->
      <div class="page-content">
      	 <#include "changePassword.ftl">
         <#include "system-set.ftl">
         <!-- BEGIN PAGE HEADER-->
		 <div class="row">
			<div class="col-md-12">
			   <!-- BEGIN PAGE TITLE & BREADCRUMB-->
			   <h3 class="page-title">
			   Edit Customer<small>Edit of customer's basic information, contact information, etc.</small>
			   </h3>
			   <ul class="page-breadcrumb breadcrumb">
			      <li>
			         <i class="icon-home"></i>
			         <a href="${base}/admin/admin!main.action">Home</a> 
			         <i class="icon-angle-right"></i>
			      </li>
			      <li>
			         <a href="#">Customer Management</a>
			         <i class="icon-angle-right"></i>
			      </li>
			      <li>
			      	<a href="${base}/admin/customer!myCustomer.action">My Customer</a>
			      	<i class="icon-angle-right"></i>
			      </li>
			      <li>
			      	<a href="#">Edit Customer</a>
			      </li>
			   </ul>
			   <!-- END PAGE TITLE & BREADCRUMB-->
			</div>
		 </div>
		 <!-- END PAGE HEADER-->
		<!-- BEGIN PAGE CONTENT-->
		<div class="row">
			<div class="col-md-12">
               <!-- BEGIN VALIDATION STATES-->
               <div class="portlet box blue">
                  <div class="portlet-title">
                     <div class="caption"><i class="icon-reorder"></i>Customer Information</div>
                     <div class="tools">
                        <a href="javascript:;" class="collapse"></a>
                        <a href="#portlet-config" data-toggle="modal" class="config"></a>
                        <a href="javascript:;" class="reload"></a>
                        <a href="javascript:;" class="remove"></a>
                     </div>
                  </div>
                  <div class="portlet-body form">
                     <!-- BEGIN FORM-->
                     <form action="${base}/admin/customer!save.action" id="form_customer" class="form-horizontal">
                        <div class="form-body">
                        	<h3 class="form-section">Customer basic information</h3>
                           <div class="alert alert-danger display-hide">
                              <button class="close" data-dismiss="alert"></button>
                              You have some form errors. Please check below.
                           </div>
                           <div class="alert alert-success display-hide">
                              <button class="close" data-dismiss="alert"></button>
                              Your form validation is successful!
                           </div>
                           
                           <div class="row">
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">Customer No.<span class="required">*</span></label>
                                     <div class="col-md-9">
                                        <input type="text" class="form-control" name = "number" <#if number?exists> value = "${number}"</#if> readonly/>
                                        <input type="hidden" class="form-control" name = "customerId" <#if customerId?exists> value = "${customerId}"</#if> />
                                     </div>
                                  </div>
                               </div>
                               <!--/span-->
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">Fullname<span class="required">*</span></label>
                                     <div class="col-md-9">
                                        <input type="text" name = "fullname" <#if fullname?exists> value = "${fullname}"</#if> class="form-control" >
                                     </div>
                                  </div>
                               </div>
                               <!--/span-->
                            </div>
                           <!--/row-->
                            <div class="row">
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">Abbreviation<span class="required">*</span></label>
                                     <div class="col-md-9">
                                        <input type="text" name = "abbreviation" <#if abbreviation?exists> value = "${abbreviation}"</#if> class="form-control">
                                     </div>
                                  </div>
                               </div>
                               <!--/span-->
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">The Current Stage<span class="required">*</span></label>
                                     <div class="col-md-9">
                                        <select class="form-control" name = "theCurrentStage" id = "theCurrentStage">
                                           <option value=""></option>
                                           <option <#if theCurrentStage?exists><#if theCurrentStage == "售前跟踪"> selected = "selected" </#if></#if> value="售前跟踪">售前跟踪</option>
                                           <option <#if theCurrentStage?exists><#if theCurrentStage == "合同执行"> selected = "selected" </#if></#if> value="合同执行">合同执行</option>
                                           <option <#if theCurrentStage?exists><#if theCurrentStage == "售后服务"> selected = "selected" </#if></#if> value="售后服务">售后服务</option>
                                           <option <#if theCurrentStage?exists><#if theCurrentStage == "合同期满"> selected = "selected" </#if></#if> value="合同期满">合同期满</option>
                                        </select>
                                        <span class="help-block">Please select a customer at present stage</span>
                                     </div>
                                  </div>
                               </div>
                               <!--/span-->
                            </div>
                            <!--/row-->
                            <div class="row">
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">Relation Grade<span class="required">*</span></label>
                                     <div class="col-md-9">
                                        <select class="form-control" name = "relationGrade" id = "relationGrade">
                                           <option value=""></option>
                                           <option <#if relationGrade?exists><#if relationGrade == "密切"> selected = "selected" </#if></#if> value="密切">密切</option>
                                           <option <#if relationGrade?exists><#if relationGrade == "较好"> selected = "selected" </#if></#if> value="较好">较好</option>
                                           <option <#if relationGrade?exists><#if relationGrade == "一般"> selected = "selected" </#if></#if> value="一般">一般</option>
                                           <option <#if relationGrade?exists><#if relationGrade == "较差"> selected = "selected" </#if></#if> value="较差">较差</option>
                                        </select>
                                        <span class="help-block">请选择与客户的关系等级</span>
                                     </div>
                                  </div>
                               </div>
                               <!--/span-->
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">Types of customers<span class="required">*</span></label>
                                     <div class="col-md-9">
                                        <select class="form-control" name = "typeOfCustomers" id = "typeOfCustomers">
                                           <option value=""></option>
                                           <option <#if typeOfCustomers?exists><#if typeOfCustomers == "潜在客户"> selected = "selected" </#if></#if> value="潜在客户">潜在客户</option>
                                           <option <#if typeOfCustomers?exists><#if typeOfCustomers == "普通客户"> selected = "selected" </#if></#if> value="普通客户">普通客户</option>
                                           <option <#if typeOfCustomers?exists><#if typeOfCustomers == "vip客户"> selected = "selected" </#if></#if> value="vip客户">vip客户</option>
                                           <option <#if typeOfCustomers?exists><#if typeOfCustomers == "代理商"> selected = "selected" </#if></#if> value="代理商">代理商</option>
                                           <option <#if typeOfCustomers?exists><#if typeOfCustomers == "合作伙伴"> selected = "selected" </#if></#if> value="合作伙伴">合作伙伴</option>
                                           <option <#if typeOfCustomers?exists><#if typeOfCustomers == "失效客户"> selected = "selected" </#if></#if> value="失效客户">失效客户</option>
                                        </select>
                                        <span class="help-block">Please select the type of customers</span>
                                     </div>
                                  </div>
                               </div>
                               <!--/span-->
                            </div>
                            <!--/row-->        
                            <div class="row">
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">Source<span class="required">*</span></label>
                                     <div class="col-md-9">
                                        <select class="select2_category form-control" name = "source" id = "source">
                                           <option value=""></option>
                                           <option <#if source?exists><#if source == "电话来访"> selected = "selected" </#if></#if> value="电话来访">电话来访</option>
                                           <option <#if source?exists><#if source == "客户介绍"> selected = "selected" </#if></#if> value="客户介绍">客户介绍</option>
                                           <option <#if source?exists><#if source == "独立开发"> selected = "selected" </#if></#if> value="独立开发">独立开发</option>
                                           <option <#if source?exists><#if source == "促销活动"> selected = "selected" </#if></#if> value="促销活动">促销活动</option>
                                           <option <#if source?exists><#if source == "老客户"> selected = "selected" </#if></#if> value="老客户">老客户</option>
                                           <option <#if source?exists><#if source == "代理商"> selected = "selected" </#if></#if> value="代理商">代理商</option>
                                           <option <#if source?exists><#if source == "合作伙伴"> selected = "selected" </#if></#if> value="合作伙伴">合作伙伴</option>
                                        </select>
                                        <span class="help-block">请选择客户的来源</span>
                                     </div>
                                  </div>
                               </div>
                               <!--/span-->
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">Proprietor</label>
                                     <div class="col-md-9">
                                        <select class="select2_category form-control" name = "proprietor" id = "proprietor">
                                           <option value=""></option>
                                           <#if employeeList?exists>
                                           	<#list employeeList as employee>
                                           		<option <#if employee.fullname == proprietor> selected = "selected" </#if> value = "${employee.fullname}">${employee.fullname}</option>
                                           	</#list>
                                           </#if>
                                        </select>
                                     </div>
                                  </div>
                               </div>
                               <!--/span-->
                            </div>
                            <div class="row">
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">Trade<span class="required">*</span></label>
                                     <div class="col-md-9">
                                        <input type="text" name = "trade" <#if trade?exists> value = "${trade}" </#if> class="form-control">
                                     </div>
                                  </div>
                               </div>
                               <!--/span-->
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">Website</label>
                                     <div class="col-md-9">
                                        <input type="text" name = "website" <#if website?exists> value = "${website}" </#if> class="form-control">
                                     </div>
                                  </div>
                               </div>
                               <!--/span-->
                            </div>
                            <div class="row">
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">System Version<span class="required">*</span></label>
                                     <div class="col-md-9">
                                        <select class="select2_category form-control" name = "systemVersion" id = "systemVersion">
                                           <option value=""></option>
                                           <option <#if systemVersion?exists><#if systemVersion == "大众版"> selected = "selected" </#if></#if> value="大众版">大众版</option>
                                           <option <#if systemVersion?exists><#if systemVersion == "标准版"> selected = "selected" </#if></#if> value="标准版">标准版</option>
                                           <option <#if systemVersion?exists><#if systemVersion == "专业版"> selected = "selected" </#if></#if> value="专业版">专业版</option>
                                           <option <#if systemVersion?exists><#if systemVersion == "高级版"> selected = "selected" </#if></#if> value="高级版">高级版</option>
                                        </select>
                                     </div>
                                  </div>
                               </div>
                               <!--/span-->
                               <div class="col-md-6">
                               		<div class="form-group">
		                              <label class="control-label col-md-3">Related Documents</label>
		                              <div class="col-md-9">
		                                 <div class="fileupload fileupload-new" data-provides="fileupload">
		                                    <div class="input-group">
		                                       <span class="input-group-btn">
		                                       <span class="uneditable-input">
		                                       <i class="icon-file fileupload-exists"></i> 
		                                       <span class="fileupload-preview"></span>
		                                       </span>
		                                       </span>
		                                       <span class="btn default btn-file">
		                                       <span class="fileupload-new"><i class="icon-paper-clip"></i> Select file</span>
		                                       <span class="fileupload-exists"><i class="icon-undo"></i> Change</span>
		                                       <input type="file" class="default" />
		                                       </span>
		                                       <a href="#" class="btn red fileupload-exists" data-dismiss="fileupload"><i class="icon-trash"></i> Remove</a>
		                                    </div>
		                                 </div>
		                              </div>
		                           </div>
                               </div>
                               <!--/span-->
                            </div>
                            <div class="row">
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">Is The High Seas Customer<span class="required">*</span></label>
                                     <div class="col-md-9">
                                        <div class="radio-list">                                                
                                           <label class="radio-inline">
                                           <input type="radio" name="isTheHighSeasCustomer" value="1" <#if isTheHighSeasCustomer?exists><#if isTheHighSeasCustomer == "1"> checked</#if></#if> />
                                           	Yes
                                           </label>
                                           <label class="radio-inline">
                                           <input type="radio" name="isTheHighSeasCustomer" value="0" <#if isTheHighSeasCustomer?exists><#if isTheHighSeasCustomer == "0"> checked</#if></#if> />
                                           	No
                                           </label>
                                        </div>
                                     </div>
                                  </div>
                               </div>
                               <!--/span-->
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">Is Shared<span class="required">*</span></label>
                                     <div class="col-md-9">
                                        <div class="radio-list">                                                
                                           <label class="radio-inline">
                                           <input type="radio" name="isShared" value="1" <#if isShared?exists><#if isShared == "1"> checked</#if></#if> />
                                           	Yes
                                           </label>
                                           <label class="radio-inline">
                                           <input type="radio" name="isShared" value="0" <#if isShared?exists><#if isShared == "0"> checked</#if></#if> />
                                           	No
                                           </label>
                                        </div>
                                     </div>
                                  </div>
                               </div>
                               <!--/span-->
                            </div>
                            <div class="row">
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">Features of interest</label>
                                     <div class="col-md-9">
                                        <textarea cols = "55" rows = "4" name = "featuresOfInterest" id = "featuresOfInterest"><#if featuresOfInterest?exists>${featuresOfInterest}</#if></textarea>
                                     </div>
                                  </div>
                               </div>
                               <!--/span-->
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">Remarks</label>
                                     <div class="col-md-9">
                                        <textarea cols = "55" rows = "4" name = "remarks" id = "remarks"><#if remarks?exists>${remarks}</#if></textarea>
                                     </div>
                                  </div>
                               </div>
                               <!--/span-->
                            </div>
                            <div class="row">
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">Create Date</label>
                                     <div class="col-md-9">
                                        <input name = "buildDate" type="text" class="form-control" <#if buildDate?exists> value = "${buildDate}"</#if> readonly>
                                     </div>
                                  </div>
                               </div>
                            </div>
                            <h3 class="form-section">Customer address information</h3>
                            <!--/row-->                   
                            <div class="row">
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">Province<span class="required">*</span></label>
                                     <div class="col-md-9">
                                        <input type="text" class="form-control" name = "province" <#if province?exists>value = "${province}"</#if> >
                                     </div>
                                  </div>
                               </div>
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">City<span class="required">*</span></label>
                                     <div class="col-md-9">
                                        <input type="text" class="form-control" name = "city" <#if city?exists> value = "${city}"</#if> >
                                     </div>
                                  </div>
                               </div>
                            </div>
                            <div class="row">
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">County/district</label>
                                     <div class="col-md-9">
                                        <input type="text" class="form-control" name = "CountyOrdistrict" <#if CountyOrdistrict?exists> value = "${CountyOrdistrict}"</#if>>
                                     </div>
                                  </div>
                               </div>
                               <!--/span-->
                               <div class="col-md-6">
                                  <div class="form-group">
                                     <label class="control-label col-md-3">Detail Address</label>
                                     <div class="col-md-9">
                                        <input type="text" class="form-control" name = "detailAddress" <#if detailAddress?exists> value = "${detailAddress}"</#if>>
                                     </div>
                                  </div>
                               </div>
                            </div>
                            <div class="form-actions fluid">
	                           <div class="col-md-offset-3 col-md-9">
	                              <button type="submit" class="btn green"><i class="icon-ok"></i>Update</button>
	                              <button type="button" class="btn default"><i class="icon-remove"></i>Cancel</button>                              
	                           </div>
	                        </div>
                            <h3 class="form-section">Customer contacts information</h3>
                            <div class = "row">
                            	<div class="col-md-12">
                            	<table class="table table-striped table-bordered table-hover" id="customer">
			                        <thead>
			                           <tr>
			                              <th class="hidden-480">联系人名称</th>
			                              <th class="hidden-480">性别</th>
			                              <th class="hidden-480">手机号码</th>
			                              <th class="hidden-480">公司电话</th>
			                              <th class="hidden-480">地址</th>
			                              <th class="hidden-480">类型</th>
			                              <th class="hidden-480">备注</th>
			                           </tr>
			                        </thead>
			                        <tbody>
			                           <#if contactsList?exists>
				                        	<#list contactsList as contacts>
					                           <tr class="odd gradeX">
					                              <td class="hidden-480"><#if contacts.name?exists><a href = "javascript:;" onclick = "return displayContacts(${contacts.id});">${contacts.name}</a></#if></td>
					                              <td class="hidden-480"><#if contacts.gender?exists>${contacts.gender}</#if></td>
					                              <td class="hidden-480"><#if contacts.telephone?exists>${contacts.telephone}</#if></td>
					                              <td class="hidden-480"><#if contacts.phone?exists>${contacts.phone}</#if></td>
					                              <td class="hidden-480"><#if contacts.address?exists>${contacts.address}</#if></td>
					                              <td class="hidden-480"><#if contacts.type?exists>${contacts.type}</#if></td>
					                              <td class="hidden-480"><#if contacts.remarks?exists>${contacts.remarks}</#if></td>
					                           </tr>
				                           </#list>
			                           </#if>
			                        </tbody>
			                     </table>
			                   </div>  
                            </div>
                            <#include "viewContacts.ftl">
                     </form>
                     <!-- END FORM-->
                  </div>
               </div>
               <!-- END VALIDATION STATES-->
            </div>
         </div>   
         <!-- END PAGE CONTENT-->
      </div>
      <!-- END PAGE -->	 
	</div>
	<!-- END CONTAINER -->
	<#include "footer.ftl">
   <!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
   <#include "coreJsPlugins.ftl">
   <!-- BEGIN PAGE LEVEL PLUGINS -->
   <script type="text/javascript" src="${base}/assets/plugins/jquery-validation/dist/jquery.validate.min.js"></script>
   <script type="text/javascript" src="${base}/assets/plugins/jquery-validation/dist/additional-methods.min.js"></script>
   <script type="text/javascript" src="${base}/assets/plugins/select2/select2.min.js"></script>
   <script type="text/javascript" src="${base}/assets/plugins/bootstrap-wysihtml5/wysihtml5-0.3.0.js"></script> 
   <script type="text/javascript" src="${base}/assets/plugins/bootstrap-wysihtml5/bootstrap-wysihtml5.js"></script>
   <script type="text/javascript" src="${base}/assets/plugins/ckeditor/ckeditor.js"></script>
   <script type="text/javascript" src="${base}/assets/plugins/fuelux/js/spinner.min.js"></script>
   <script type="text/javascript" src="${base}/assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
   <script type="text/javascript" src="${base}/assets/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
   <script type="text/javascript" src="${base}/assets/plugins/clockface/js/clockface.js"></script>
   <script type="text/javascript" src="${base}/assets/plugins/bootstrap-daterangepicker/moment.min.js"></script>
   <script type="text/javascript" src="${base}/assets/plugins/bootstrap-daterangepicker/daterangepicker.js"></script> 
   <script type="text/javascript" src="${base}/assets/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.js"></script>  
   <script type="text/javascript" src="${base}/assets/plugins/bootstrap-timepicker/js/bootstrap-timepicker.js"></script>
   <script type="text/javascript" src="${base}/assets/plugins/jquery-inputmask/jquery.inputmask.bundle.min.js"></script>   
   <script type="text/javascript" src="${base}/assets/plugins/jquery.input-ip-address-control-1.0.min.js"></script>
   <script type="text/javascript" src="${base}/assets/plugins/jquery-multi-select/js/jquery.multi-select.js"></script>
   <script type="text/javascript" src="${base}/assets/plugins/jquery-multi-select/js/jquery.quicksearch.js"></script>   
   <script src="${base}/assets/plugins/jquery.pwstrength.bootstrap/src/pwstrength.js" type="text/javascript" ></script>
   <script src="${base}/assets/plugins/bootstrap-switch/static/js/bootstrap-switch.min.js" type="text/javascript" ></script>
   <script src="${base}/assets/plugins/jquery-tags-input/jquery.tagsinput.min.js" type="text/javascript" ></script>
   <script type="text/javascript" src="${base}/assets/plugins/bootstrap-fileupload/bootstrap-fileupload.js"></script>
   <!-- END PAGE LEVEL PLUGINS -->
   <!-- BEGIN PAGE LEVEL STYLES -->
   <script src="${base}/assets/scripts/app.js"></script>
   <script src="${base}/resources/scripts/customer-edit-validation.js"></script>
   <!-- END PAGE LEVEL STYLES -->    
   <script>
      jQuery(document).ready(function() {   
         // initiate layout and plugins
         App.init();
         CustomerValidation.init();
      });
      function displayContacts(id){
      	$.ajax({
            type:"post",
            url:"/crm/admin/contacts!findById.action",
            dataType:"json",
            data:"contactsId="+id,
            cache:false,
            beforeSend:function(XMLHttpRequest){
            },
            success:function(json){
            	result = json.result;
            	if(result){
	            	contacts = json.contacts;
	            	$("input[name='lxr']").val(contacts.name);
	                $("#gender").val(contacts.gender);
	                $("input[name='telephone']").val(contacts.telephone);
	                $("input[name='companyPhone']").val(contacts.phone);
	                $("input[name='fax']").val(contacts.fax);
	                $("input[name='email']").val(contacts.email);
	                $("input[name='zipcode']").val(contacts.zipcode);
	                $("input[name='address']").val(contacts.address);
	                $("input[name='remarksToContacts']").val(contacts.remarks);
	                var type = contacts.type;
	                if(type=="Importance"){
	                	$("input:radio[value='Importance']").parents('span').addClass('checked');
	                }else if(type=="Secondary"){
	                	$("input:radio[value='Secondary']").parents('span').addClass('checked');
	                }else{
	                	$("input:radio[value='']").parents('span').addClass('checked');
	                }
	            }else{
	            	alert("程序异常,请与开发人员联系!");
	            }
            },
           	complete:function(XMLHttpRequest,textStatus){
           	},
          	error:function(XMLHttpRequest,textStatus,errorThrown){
                   alert("网络错误,重稍后重试!");
          	}
        });
      }
   </script>
   <!-- END JAVASCRIPTS -->
</body>
</html>